package com.swanclouds.model.identity;

import com.swanclouds.model.ModelEntity;
import com.swanclouds.model.shared.RootResource;

import java.util.Date;

/**
 * V1 token model
 */
public interface Token extends ModelEntity {

    /**
     * @return the id of the token
     */
    String getId();

    /**
     * sets the id of the token from response header value
     *
     * @param id the token id
     */
    void setId(String id);

    /**
     * @return the eTag of the token
     */
    String getETag();

    /**
     * sets the id of the token from response header value
     *
     * @param eTag the token id
     */
    void setETag(String eTag);

    /**
     * @return the timestamp when the token expires
     */
    Date getExpires();

    /**
     * @return the endpoint
     */
    String getEndpoint();

    String getLocation();

    String getCacheIdentifier();

    RootResource getRootResource();

    AuthStore getCredentials();

}
